home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Msh 1.0.0.sit / Msh 1.0.0 f / Manual / MAN2G.HLP < prev    next >
Text File  |  1996-11-14  |  38KB  |  1,418 lines

  1. /***Intro***/ GUI WindowManager Window DialogManager Dialog ControlManager Control MenuManager Menu
  2. Intro(2g)
  3.  
  4. 【名前】
  5.     Intro - Toolbox: GUI関連(man2g.hlp)
  6.  
  7. 【概要】
  8.  
  9. 【Inside Macintosh】
  10.                                 <<キーワード>>
  11.     Window Manager                        WindowManager
  12.         I-267
  13.         IV-49    Zoom の記述
  14.         V-197    カラー,マルチスクリーン対応
  15.  
  16.     Dialog Manager                        DialogManager
  17.         I-397
  18.         IV-59    HideDItem(), ShowDItem(), FindDItem(),
  19.                         UpdtDialog() の追加
  20.         V-277    カラー対応
  21.         VI-3-19    アイテムリストの操作(追加,短縮)
  22.  
  23.     Control Manager                        ControlManager
  24.         I-309
  25.         IV-53    UpdtControl(), Draw1Control() の追加
  26.         V-216    カラー対応
  27.         VI-3-16    ポップアップメニューコントロール
  28.  
  29.     Menu Manager                        MenuManager
  30.         I-339
  31.         IV-55    InsMenuItem(), DelMenuItem() の追加
  32.         V-225    階層メニュー, ポップアップメニュー, カラー対応
  33.  
  34.     Layer Manager                        LayerManager
  35.         InsideMac には記述がない
  36.  
  37. 【関連項目】
  38.     QuickDraw(2q)
  39.     TextEdit(2t)
  40.  
  41. 【ヘッダー】
  42.     Windows.h
  43.     Dialogs.h
  44.     Controls.h
  45.     Menus.h
  46.     Layers.h (Apple からは提供されていない)
  47. /***WindowRecord***/ WindowPeek CWindowRecord CWindowPeek WinCTab WCTabPtr WCTabHandle WStateData WStateDataPtr WStateDataHandle WindowManager
  48. WindowRecord(2g)
  49.  
  50. 【名前】
  51.     WindowRecord  - データタイプ
  52.     CWindowRecord - データタイプ
  53.     WStateData    - データタイプ
  54.     WinCTab          - データタイプ
  55.  
  56. 【形式】
  57.     WindowRecord と CWindowRecord の識別方法
  58.         ((CGrafPort*)port)->portVersion の上位 2bit がオンの場合カラー
  59.  
  60.     ■WindowRecord    I-276
  61.       WindowRecord
  62.         GrafPort    port;
  63.         short        windowKind;
  64.         Boolean        visible;
  65.         Boolean        hilited;
  66.         Boolean        goAwayFlag;
  67.         Boolean        spareFlag;    Zoom で使用される
  68.         RgnHandle    strucRgn;
  69.         RgnHandle    contRgn;
  70.         RgnHandle    updateRgn;
  71.         Handle        windowDefProc;
  72.         Handle        dataHandle;    Zoom 時は、WStateDataが入る
  73.         StringHandle    titleHandle;
  74.         short        titleWidth;
  75.         ControlHandle    controlList;
  76.         WindowRecord    *nextWindow;
  77.         PicHandle    windowPic;
  78.         long        refCon;
  79.       WindowPeek    WindowRecord *
  80.  
  81.     ■CWindowRecord    ??
  82.       CWindowRecord
  83.         CGrafPort    port;
  84.         short        windowKind;
  85.         Boolean        visible;
  86.         Boolean        hilited;
  87.         Boolean        goAwayFlag;
  88.         Boolean        spareFlag;
  89.         RgnHandle    strucRgn;
  90.         RgnHandle    contRgn;
  91.         RgnHandle    updateRgn;
  92.         Handle        windowDefProc;
  93.         Handle        dataHandle;
  94.         StringHandle    titleHandle;
  95.         short        titleWidth;
  96.         ControlHandle    controlList;
  97.         CWindowRecord    *nextWindow;
  98.         PicHandle    windowPic;
  99.         long        refCon;
  100.       CWindowPeek    CWindowRecord *
  101.  
  102.     ■WStateData    IV-49
  103.       ズームのためのデータ
  104.       WStateData
  105.         Rect    userState;
  106.         Rect    stdState;
  107.       WStateDataPtr        WStateData *
  108.       WStateDataHandle    WStateData **
  109.  
  110.     ■WinCTab    V-202
  111.       WinCTab
  112.         long    wCSeed;
  113.         short    wCReserved;
  114.         short    ctSize;
  115.         ColorSpec ctTable[5];
  116.       WCTabPtr    WinCTab *
  117.       WCTabHandle    WinCTab **
  118. /***InitWindows***/ InitMenus InitDialogs ResumeProcPtr WindowManager
  119. InitWindows(2g)
  120.  
  121. 【名前】
  122.     InitWindows - ウインドウマネージャの初期化
  123.     InitMenus   - メニューマネージャの初期化
  124.     InitDialogs - ダイアログマネージャの初期化
  125.  
  126. 【書式】
  127.     ■InitWindows    I-281; V-208
  128.     ■InitMenus    I-351; V-242
  129.     ■InitDialogs    I-411
  130.  
  131.     void    InitWindows(void);
  132.           先立って以下を呼び出してください
  133.             InitGraf
  134.             InitFonts
  135.  
  136.     void    InitMenus(void);
  137.           先立って以下を呼び出してください
  138.             InitGraf
  139.             InitFonts
  140.             InitWindows
  141.  
  142.     void    InitDialogs(ResumeProcPtr resumeProc);
  143.           先立って以下を呼び出してください
  144.             InitGraf
  145.             InitFonts
  146.             InitWindows
  147.             InitMenus
  148.             TEInit
  149.  
  150.     ■ResumeProcPtr
  151.       pascal void (*ResumeProcPtr)(void);
  152. /***GetWMgrPort***/ GetCWMgrPort SetWinColor GetAuxWin AuxWinRec AuxWinPtr AuxWinHandle WindowManager
  153. GetWMgrPort(2g)
  154.  
  155. 【名前】
  156.     GetWMgrPort  - 
  157.     GetCWMgrPort -
  158.     SetWinColor  -
  159.     GetAuxWin    -
  160.     AuxWinRec    - データタイプ
  161.  
  162. 【書式】
  163.     ■GetWMgrPort    I-282
  164.     ■GetCWMgrPort    V-205, 210
  165.     ■SetWinColor    V-207
  166.     ■GetAuxWin    V-207
  167.  
  168.     void    GetWMgrPort(GrafPtr *wPort);
  169.  
  170.     void    GetCWMgrPort(CGrafPtr *wMgrCPort);
  171.  
  172.     void    SetWinColor(WindowPtr theWindow, WCTabHandle newColorTable);
  173.  
  174.     Boolean    GetAuxWin(WindowPtr theWindow, AuxWinHandle *awHndl);
  175.  
  176.  
  177.     ■AuxWinRec    V-201
  178.  
  179.       AuxWinRec
  180.         struct    AuxWinRec **awNext;
  181.         WindowPtr    awOwner;
  182.         CTabHandle    awCTable;
  183.         Handle        dialogCItem;
  184.         long        awFlags;
  185.         CTabHandle    awReserved;
  186.         long        awRefCon;
  187.       AuxWinPtr    AuxWinRec *
  188.       AuxWinHandle    AuxWinRec **
  189. /***NewWindow***/ GetNewWindow CloseWindow DisposeWindow NewCWindow GetNewCWindow GetWVariant WindowManager
  190. NewWindow(2g)
  191.  
  192. 【名前】
  193.     NewWindow     - 新しいウインドウの作成
  194.     GetNewWindow  - リソース('WIND')からウインドウを読み込む
  195.     CloseWindow   - ウインドウを消去&メモリ解放(windowPtr は解放しない)
  196.     DisposeWindow - ウインドウを消去&メモリ解放
  197.     NewCWindow    -
  198.     GetNewCWindow -
  199.     GetWVariant   -
  200.  
  201. 【書式】
  202.     ■NewWindow    I-282
  203.     ■GetNewWindow    I-283
  204.     ■CloseWindow    I-283
  205.     ■DisposeWindow    I-284
  206.     ■NewCWindow    V-207
  207.     ■GetNewCWindow    V-207
  208.     ■GetWVariant    V-208
  209.  
  210.     ウインドウタイプ(システム標準 wind-proc)
  211.          0 documentProc    document (リサイズあり)
  212.          4 noGrowDocProc    document (リサイズなし)
  213.          8 zoonDocProc    Zoom あり document (リサイズあり)
  214.         12 zoomNoGrow    Zoom あり document (リサイズあり)
  215.  
  216.          1 dBoxProc        ダイアログ用
  217.          5 movableDBoxProc    移動可能なダイアログ [System 7.0]
  218.  
  219.          2 plainDBox    ただの四角
  220.          3 altDBoxProc    陰付きの四角
  221.         16 rDocProc        角が丸い(通常は DA 用)
  222.                     +0    16 x 16
  223.                     +1     4 x  4
  224.                     +2     6 x  6
  225.                     +3     8 x  8
  226.                     +4    10 x 10
  227.                     +5    12 x 12
  228.                     +6    20 x 20
  229.                     +7    24 x 24
  230.  
  231.     WindowPtr NewWindow(
  232.             void    *wStorage,    WindowRecord の格納先
  233.                         (NULL を渡すと NewPtr される)
  234.             Rect    *boundsRect,    表示位置,サイズ(グローバル座標)
  235.             Str255    title,        タイトル文字列
  236.             Boolean    visible,    すぐに表示するかどうか
  237.             short    theProc,    ウインドウタイプ
  238.             WindowPtr behind,    このウインドウの後ろに置く
  239.                           NULL    一番後ろ
  240.                           -1    一番前
  241.             Boolean    goAwayFlag,    GoAray ボックスを表示
  242.             long    refCon);    ユーザー用のデータ
  243.  
  244.     WindowPtr GetNewWindow(short windowID,
  245.             void    *wStorage,
  246.             WindowPtr behind);
  247.  
  248.     void    CloseWindow(WindowPtr theWindow);
  249.     void    DisposeWindow(WindowPtr theWindow);
  250.  
  251.     WindowPtr NewCWindow(void *wStorage, const Rect *boundsRect,
  252.             ConstStr255Param title, Boolean visible, short procID,
  253.             WindowPtr behind, Boolean goAwayFlag, long refCon);
  254.     WindowPtr GetNewCWindow(short windowID, void *wStorage,
  255.             WindowPtr behind);
  256.  
  257.     short    GetWVariant(WindowPtr theWindow);
  258. /***GetWTitle***/ SetWTitle SetWRefCon GetWRefCon SetWindowPic GetWindowPic WindowManager
  259. GetWTitle(2g)
  260.  
  261. 【名前】
  262.     GetWTitle    - ウインドウタイトルの取得
  263.     SetWTitle    - ウインドウタイトルの設定
  264.     SetWRefCon   - 定義データの設定
  265.     GetWRefCon   - 定義データの取得
  266.     SetWindowPic - ウインドウピクチャーの設定
  267.     GetWindowPic - ウインドウピクチャーの取得
  268.  
  269. 【書式】
  270.     ■GetWTitle    I-284
  271.     ■SetWTitle    I-284
  272.     ■SetWRefCon    I-293
  273.     ■GetWRefCon    I-293
  274.     ■SetWindowPic    I-293
  275.     ■GetWindowPic    I-293
  276.  
  277.     void    GetWTitle(WindowPtr theWindow, Str255 title);
  278.     void    SetWTitle(WindowPtr theWindow, ConstStr255Param title);
  279.  
  280.     void    SetWRefCon(WindowPtr theWindow, long data);
  281.     long    GetWRefCon(WindowPtr theWindow);
  282.  
  283.     void    SetWindowPic(WindowPtr theWindow, PicHandle pic);
  284.     PicHandle    GetWindowPic(WindowPtr theWindow);
  285. /***SelectWindow***/ HideWindow ShowWindow ShowHide HiliteWindow BringToFront SendBehind FrontWindow WindowManager
  286. SelectWindow(2g)
  287.  
  288. 【名前】
  289.     SelectWindow - ウインドウの選択(一番先頭に出す)
  290.     HideWindow   - ウインドウを隠す
  291.     ShowWindow   - ウインドウの表示
  292.     ShowHide     - ウインドウの Show/Hide
  293.     HiliteWindow - ウインドウをハイライトさせる
  294.     BringToFront - ウインドウを一番先頭にする(選択はしない)
  295.     SendBehind   - ウインドウの順番の変更(指定ウインドウの下に)
  296.     FrontWindow  - 一番前のウインドウを返す
  297.  
  298. 【書式】
  299.     ■SelectWindow    I-285
  300.     ■HideWindow    I-285
  301.     ■ShowWindow    I-285
  302.     ■ShowHide    I-286
  303.     ■HiliteWindow    I-286
  304.     ■BringToFront    I-286
  305.     ■SendBehind    I-286
  306.     ■FrontWindow    I-286
  307.  
  308.     void    SelectWindow(WindowPtr theWindow);
  309.     void    HideWindow  (WindowPtr theWindow);
  310.     void    ShowWindow  (WindowPtr theWindow);
  311.  
  312.     void    ShowHide(WindowPtr theWindow, Boolean showFlag);
  313.             showFlag =TRUE    ウインドウを表示
  314.                  =FALSE    ウインドウを隠す
  315.             ハイライトも、イベントも起こさない
  316.  
  317.     void    HiliteWindow(WindowPtr theWindow, Boolean fHilite);
  318.             fHilite が TRUE ならウインドウをハイライトさせる。
  319.  
  320.     void    BringToFront(WindowPtr theWindow);
  321.     void    SendBehind(WindowPtr theWindow, WindowPtr behindWindow);
  322.  
  323.     WindowPtr    FrontWindow(void);
  324. /***FindWindow***/ TrackGoAway TrackBox DragWindow GrowWindow DrawGrowIcon MoveWindow SizeWindow ZoomWindow WindowManager
  325. FindWindow(2g)
  326.  
  327. 【名前】
  328.     FindWindow   - ウインドウのどの部分でマウスが押されたかを取得
  329.     TrackGoAway  - クローズボックスのトラック
  330.     GrowWindow   - サイズを変更するイメージをかく
  331.     DrawGrowIcon - サイズボックスの描画
  332.     SizeWindow   - ウインドウのサイズ変更
  333.     DragWindow   - ウインドウのドラッグ処理(位置の移動)
  334.     MoveWindow   - ウインドウの移動
  335.     TrackBox     - ズームボックスのトラック
  336.     ZoomWindow   - 標準状態とユーザー状態の切り換え
  337.  
  338. 【書式】
  339.     ■FindWindow    I-287; V-208
  340.     ■TrackGoAway    I-288
  341.     ■DrawGrowIcon    I-287
  342.     ■DragWindow    I-289
  343.     ■GrowWindow    I-289; V-209
  344.  
  345.     ■MoveWindow    I-289; V-209
  346.     ■SizeWindow    I-290
  347.     ■TrackBox    IV-50
  348.     ■ZoomWindow    IV-50; V-210
  349.  
  350.     short    FindWindow(Point thePoint, WindowPtr *theWindow);
  351.             0  inDesk
  352.             1  inMenuBar
  353.             2  inSysWindow
  354.             3  inContent
  355.             4  inDrag
  356.             5  inGrow
  357.             6  inGoAway
  358.             7  inZoomIn
  359.             8  inZoomOut
  360.  
  361.     Boolean    TrackGoAway(WindowPtr theWindow, Point thePt);
  362.             戻り値:    TRUE    クローズボックス内で離された
  363.                 FALSE    それ以外で離された
  364.  
  365.     void    DragWindow(WindowPtr theWindow, Point startPt,
  366.                         const Rect *boundsRect);
  367.  
  368.         theWindowのクリックされたポイントを渡すとboundsRectないでドラ
  369.         ッグ処理を行なう
  370.  
  371.     long    GrowWindow(WindowPtr theWindow, Point startPt,
  372.                         const Rect *bBox);
  373.             サイズを変更するイメージをかき、マウスを追従
  374.                bBox.top    - 最小高
  375.                 left   - 最小幅
  376.                 bottom - 最大高
  377.                 right  - 最大幅
  378.             戻り値:    HiWord    高さ
  379.                 LowWord    幅
  380. ### グローバル変数に設定すると、1ドット毎でなく動かせる
  381.  
  382.     void    DrawGrowIcon(WindowPtr theWindow);
  383.  
  384.     void    MoveWindow(WindowPtr theWindow, short hGlobal, short vGlobal,
  385.                                 Boolean front);
  386.             ウインドウの grafPort の portRect の左上を指定グロー
  387.             バル座標に移動
  388.                 front=TRUE -- アクティブになる
  389.  
  390.     void    SizeWindow(WindowPtr theWindow, short w, short h,
  391.                             Boolean fUpdate);
  392.             portRect の大きさを変更(w=h=0 の場合はなにもしない)
  393.             fUpdate = TRUE --  変更によって生じたリージョンを変える
  394.  
  395.     Boolean    TrackBox(WindowPtr theWindow, Point thePt, short partCode);
  396.             戻り値:    TRUE    ズームボックス内で離された
  397.                 FALSE    それ以外で離された
  398.  
  399.     void    ZoomWindow(WindowPtr theWindow, short partCode, Boolean front);
  400.             標準状態とユーザー状態を切り換える。それぞれ、
  401.             WindowPtr^^.WStateDate.stdStateとuserState
  402. /***InvalRect***/ InvalRgn ValidRect ValidRgn BeginUpdate EndUpdate WindowManager
  403. InvalRect(2g)
  404.  
  405. 【名前】
  406.     InvalRect   - Rect をアップデートリージョンに繰入れる
  407.     InvalRgn    - Rgn  をアップデートリージョンに繰入れる
  408.     ValidRect   - Rect をアップデートリージョンからとる
  409.     ValidRgn    - Rgn  をアップデートリージョンからとる
  410.     BeginUpdate - ウインドウのアップデートの準備をする
  411.     EndUpdate   - ウインドウのアップデートをおえる
  412.  
  413. 【書式】
  414.     ■InvalRect    I-291
  415.     ■InvalRgn    I-291
  416.     ■ValidRect    I-292
  417.     ■ValidRgn    I-292
  418.     ■BeginUpdate    I-292
  419.     ■EndUpdate    I-293
  420.  
  421.     void    InvalRect(const Rect *badRect);
  422.     void    InvalRgn(RgnHandle badRgn);
  423.     void    ValidRect(const Rect *goodRect);
  424.     void    ValidRgn(RgnHandle goodRgn);
  425.  
  426.     void    BeginUpdate(WindowPtr theWindow);
  427.     void    EndUpdate  (WindowPtr theWindow);
  428. /***PinRect***/ DragGrayRgn GetGrayRgn SetDeskCPat DragGrayRgnProcPtr WindowManager
  429. PinRect(2g)
  430.  
  431. 【名前】
  432.     PinRect     -
  433.     DragGrayRgn -
  434.     GetGrayRgn  - 現在のデスクトップ領域の Rgnハンドルの取得
  435.     SetDeskCPat - デスクトップパターンの設定
  436.  
  437. 【書式】
  438.     ■PinRect    I-293
  439.     ■DragGrayRgn    I-294; V-209
  440.     ■GetGrayRgn    V-208
  441.     ■SetDeskCPat    V-210
  442.  
  443.     long    PinRect(const Rect *theRect, Point thePt);
  444.         thePtに一番近いtheRect内のポイントを得る。上位に縦、下位に横
  445.  
  446.     long    DragGrayRgn(RgnHandle theRgn, Point startPt,
  447.             const Rect *boundsRect, const Rect *slopRect,
  448.             short axis, DragGrayRgnProcPtr actionProc);
  449.  
  450.             procタイプ   pascal void (*DragGrayRgnProcPtr)(void);
  451.  
  452.     RgnHandle    GetGrayRgn(void);
  453.  
  454.     void    SetDeskCPat(PixPatHandle deskPixPat);
  455. /***CheckUpdate***/ ClipAbove SaveOld DrawNew PaintOne PaintBehind CalcVis CalcVisBehind WindowManager
  456. CheckUpdate(2g)
  457.  
  458. 【名前】
  459.     CheckUpdate   - 低レベルウインドウルーチン
  460.     ClipAbove     -
  461.     SaveOld       -
  462.     DrawNew       -
  463.     PaintOne      -
  464.     PaintBehind   -
  465.     CalcVis       -
  466.     CalcVisBehind -
  467.  
  468. 【書式】
  469.     ■CheckUpdate    I-296
  470.     ■ClipAbove    I-296
  471.     ■SaveOld    I-296
  472.     ■DrawNew    I-296
  473.     ■PaintOne    I-296; V-208
  474.     ■PaintBehind    I-297
  475.     ■CalcVis    I-297
  476.     ■CalcVisBehind    I-297
  477.  
  478.     Boolean    CheckUpdate(EventRecord *theEvent);
  479.     void    ClipAbove(WindowPeek window);
  480.     void    SaveOld(WindowPeek window);
  481.     void    DrawNew(WindowPeek window, Boolean update);
  482.     void    PaintOne(WindowPeek window, RgnHandle clobberedRgn);
  483.     void    PaintBehind(WindowPeek startWindow, RgnHandle clobberedRgn);
  484.     void    CalcVis(WindowPeek window);
  485.     void    CalcVisBehind(WindowPeek startWindow, RgnHandle clobberedRgn);
  486. #
  487. #
  488. #
  489. /***DialogTemplate***/ DialogManager
  490. DialogTemplate(2g)
  491.  
  492. 【名前】
  493.     DialogTemplate -
  494.  
  495. 【形式】
  496.     ■DialogTemplate    I-423
  497.       DialogTemplate
  498.         Rect    boundsRect;
  499.         short    procID;
  500.         Boolean visible;
  501.         Boolean filler1;
  502.         Boolean goAwayFlag;
  503.         Boolean filler2;
  504.         long    refCon;
  505.         short    itemsID;
  506.         Str255    title;
  507.  
  508.       DialogTPtr    DialogTemplate *
  509.       DialogTHndl    DialogTemplate **
  510. /***DialogRecord***/ DialogPeek StageList DialogPtr DialogManager
  511. DialogRecord(2g)
  512.  
  513. 【名前】
  514.     DialogRecord - ダイアログ data type
  515.  
  516. 【形式】
  517.     ■DialogRecord    I-408
  518.       DialogRecord
  519.         WindowRecord window;
  520.         Handle    items;
  521.         TEHandle textH;
  522.         short    editField;
  523.         short    editOpen;
  524.         short    aDefItem;
  525.  
  526.       DialogPeek    DialogRecord *
  527.  
  528.     ■DialogPtr    I-407
  529.       DialogPtr    WindowPtr
  530.  
  531.     ■StageList    I-424
  532.       StageList    short
  533. /***NewDialog***/ NewCDialog GetNewDialog CloseDialog DisposDialog CouldDialog FreeDialog SetDAFont ErrorSound SoundProcPtr DialogManager
  534. NewDialog(2g)
  535.  
  536. 【名前】
  537.     NewDialog    - ダイアログの作成
  538.     NewCDialog   - カラーダイアログの作成
  539.     GetNewDialog - 'DLOG' リソースの取得&表示
  540.     CloseDialog  - スタック上のダイアログを消します
  541.     DisposDialog - ヒープ上のダイアログを消します
  542.     SetDAFont    - 次に出るダイアログのフォントを指定
  543.     ErrorSound   -
  544.     CouldDialog  - [Sys7.0 よりダメ]
  545.     FreeDialog   - [Sys7.0 よりダメ]
  546.  
  547. 【書式】
  548.     ■NewDialog    I-412
  549.     ■NewCDialog    V-283
  550.     ■GetNewDialog    I-413; V-274
  551.     ■CloseDialog    I-413
  552.     ■DisposDialog    I-415
  553.     ■SetDAFont    I-412
  554.     ■ErrorSound    I-411
  555.     ■CouldDialog    I-415; V-284; ← VI-3-10 で使ってはいけない
  556.     ■FreeDialog    I-415; V-285; ← VI-3-10 で使ってはいけない
  557.  
  558.     DialogPtr NewDialog(void *wStorage, const Rect *boundsRect,
  559.             ConstStr255Param title, Boolean visible, short procID,
  560.             WindowPtr behind, Boolean goAwayFlag, long refCon,
  561.             Handle itmLstHndl);
  562.     DialogPtr NewCDialog(void *dStorage, const Rect *boundsRect,
  563.             ConstStr255Param title, Boolean visible, short procID,
  564.             WindowPtr behind, Boolean goAwayFlag, long refCon,
  565.             Handle items);
  566.  
  567.         procIDでタイプを、itemsでアイテムリストへのハンドルを指定して
  568.         ください。(NewWindow参照)
  569.  
  570.     DialogPtr    GetNewDialog(short dialogID, void *dStorage,
  571.                 WindowPtr behind);
  572.  
  573.     void    CloseDialog(DialogPtr theDialog);
  574.     void    DisposDialog(DialogPtr theDialog);
  575.             ヒープ上のダイアログを消します
  576.  
  577.     void    SetDAFont(short fontNum);
  578.  
  579.     void    ErrorSound(SoundProcPtr soundProc);
  580.  
  581.     void    CouldDialog(short dialogID);
  582.     void    FreeDialog(short dialogID);
  583.  
  584.     ■SoundProcPtr
  585.       pascal void (*SoundProcPtr)(void);
  586. /***ParamText***/ DialogManager
  587. ParamText(2g)
  588.  
  589. 【名前】
  590.     ParamText - 現ダイアログの StaticText の固定文字列を設定
  591.  
  592. 【書式】
  593.     ■ParamText    I-422
  594.  
  595.     void    ParamText(ConstStr255Param param0, ConstStr255Param param1,
  596.             ConstStr255Param param2, ConstStr255Param param3);
  597.  
  598.         固定文字列の^0,^1,^2,^3と入れ替えさせる
  599. /***ModalDialog***/ ModalFilterProcPtr DialogManager
  600. ModalDialog(2g)
  601.  
  602. 【名前】
  603.     ModalDialog - ダイアログのイベント処理
  604.  
  605. 【書式】
  606.     ■ModalDialog    I-415
  607.  
  608.     void    ModalDialog(ModalFilterProcPtr filterProc, short *itemHit);
  609.             フィルタ関数があるときはfilterProcで指定してください。
  610.             itemHit: イベントの起きたアイテム
  611.  
  612.     ■ModalFilterProcPtr
  613.       pascal Boolean (*ModalFilterProcPtr)(DialogPtr theDialog,
  614.                 EventRecord *theEvent, short *itemHit);
  615. /***IsDialogEvent***/ DialogSelect DialogManager
  616. IsDialogEvent(2g)
  617.  
  618. 【名前】
  619.     IsDialogEvent - イベントがダイアログに向けられたものかチェック
  620.     DialogSelect  - イベントがダイアログのどのアイテムに向けられたか
  621.  
  622. 【書式】
  623.     ■IsDialogEvent    I-416
  624.     ■DialogSelect    I-417
  625.  
  626.     Boolean    IsDialogEvent(const EventRecord *theEvent);
  627.  
  628.         theEventがダイアログに向けられたものならTRUEを返します
  629.  
  630.  
  631.     Boolean    DialogSelect(const EventRecord *theEvent, DialogPtr *theDialog,
  632.             short *itemHit);
  633.  
  634.         theEventがダイアログのイネーブルアイテムにむけられたものなら
  635.         TRUEが返される
  636. /***DrawDialog***/ UpdtDialog DialogManager
  637. DrawDialog(2g)
  638.  
  639. 【名前】
  640.     DrawDialog - ダイアログの再描画
  641.     UpdtDialog - 指定部分の再描画
  642.  
  643. 【書式】
  644.     ■DrawDialog    I-418
  645.     ■UpdtDialog    IV-60
  646.  
  647.     void    DrawDialog(DialogPtr theDialog);
  648.         ダイアログの枠線以外を再描画する
  649.  
  650.     void    UpdtDialog(DialogPtr theDialog, RgnHandle updateRgn);
  651.         updateRgnで指定した部分を再描画する
  652. /***Alert***/ StopAlert NoteAlert CautionAlert CouldAlert FreeAlert ResetAlrtStage AlertTemplate GetAlrtStage DialogManager
  653. Alert(2g)
  654.  
  655. 【名前】
  656.     Alert        - アラートダイアログ処理
  657.     StopAlert    - アラートダイアログ処理(Stop)
  658.     NoteAlert    - アラートダイアログ処理(Note)
  659.     CautionAlert - アラートダイアログ処理(Caution)
  660.     ResetAlrtStage - 最後に実行されたアラートステージのリセット
  661.     GetAlrtStage   - 
  662.     AlertTemplate  - data type
  663.     CouldAlert   - [Sys7.0 よりダメ]
  664.     FreeAlert    - [Sys7.0 よりダメ]
  665.  
  666. 【書式】
  667.     ■Alert        I-418; V-284
  668.     ■StopAlert    I-419; V-284
  669.     ■NoteAlert    I-420; V-284
  670.     ■CautionAlert    I-420; V-284
  671.     ■ResetAlrtStage I-423
  672.     ■GetAlrtStage    ??
  673.     ■CouldAlert    I-420; V-285 ← VI-3-10 で使ってはいけない
  674.     ■FreeAlert    I-420; V-285 ← VI-3-10 で使ってはいけない
  675.  
  676.     short    Alert(short alertID, ModalFilterProcPtr filterProc);
  677.     short    StopAlert(short alertID, ModalFilterProcPtr filterProc);
  678.     short    NoteAlert(short alertID, ModalFilterProcPtr filterProc);
  679.     short    CautionAlert(short alertID, ModalFilterProcPtr filterProc);
  680.  
  681.         alertIDで示されるアラートを表示し、アイテムにイベントが起きた
  682.         ところでアラートを閉る
  683.  
  684.         戻り値: イベントの起きたアイテム番号
  685.  
  686.  
  687.     void    ResetAlrtStage(void);
  688.             最後に実行されたアラートのステージをリセットします
  689.  
  690.     short    GetAlrtStage(void);
  691.  
  692.     void    CouldAlert(short alertID);
  693.     void    FreeAlert(short alertID);
  694.  
  695.  
  696.     ■AlertTemplate    I-424
  697.  
  698.       AlertTemplate
  699.         Rect    boundsRect;
  700.         short    itemsID;
  701.         StageList stages;
  702.  
  703.       AlertTPtr    AlertTemplate *
  704.       AlertTHndl    AlertTemplate **
  705. /***GetDItem***/ SetDItem HideDItem ShowDItem SelIText GetIText SetIText FindDItem DialogManager
  706. GetDItem(2g)
  707.  
  708. 【名前】
  709.     GetDItem  - アイテム情報の取得
  710.     SetDItem  - アイテム情報の設定
  711.     HideDItem - アイテムを隠す
  712.     ShowDItem - アイテムを出す
  713.     SelIText  -
  714.     GetIText  -
  715.     SetIText  -
  716.     FindDItem - ローカル座標にかかるアイテム番号の取得
  717.  
  718. 【書式】
  719.     ■GetDItem    I-421
  720.     ■SetDItem    I-421
  721.     ■HideDItem    IV-59
  722.     ■ShowDItem    IV-59
  723.     ■SelIText    I-422
  724.     ■GetIText    I-422
  725.     ■SetIText    I-422
  726.     ■FindDItem    IV-60
  727.  
  728.     void    GetDItem(DialogPtr theDialog, short itemNo, short *itemType,
  729.                         Handle *item, Rect *box);
  730.             theDialogのアイテム番号itemNoのアイテムを返す
  731.  
  732.     void    SetDItem(DialogPtr theDialog, short itemNo, short itemType,
  733.                         Handle item, const Rect *box);
  734.             theDialogのアイテム番号itemNoのアイテムを変える
  735.  
  736.     void    HideDItem(DialogPtr theDialog, short itemNo);
  737.     void    ShowDItem(DialogPtr theDialog, short itemNo);
  738.  
  739.     void    SelIText(DialogPtr theDialog, short itemNo, short strtSel,
  740.                         short endSel);
  741.     void    GetIText(Handle item, Str255 text);
  742.     void    SetIText(Handle item, ConstStr255Param text);
  743.  
  744.     short    FindDItem(DialogPtr theDialog, Point thePt);
  745.             thePt(ローカル座標)のかかるアイテム番号を返す
  746. /***DlgCut***/ DlgPaste DlgCopy DlgDelete DialogManager
  747. DlgCut(2g)
  748.  
  749. 【名前】
  750.     DlgCut    - 選択範囲をカット
  751.     DlgPaste  - 選択範囲をペースト
  752.     DlgCopy   - 選択範囲をコピー
  753.     DlgDelete - 選択範囲をクリア
  754.  
  755. 【書式】
  756.     ■DlgCut    I-418
  757.     ■DlgPaste    I-418
  758.     ■DlgCopy    I-418
  759.     ■DlgDelete    I-418
  760.  
  761.     void    DlgCut   (DialogPtr theDialog);
  762.     void    DlgPaste (DialogPtr theDialog);
  763.     void    DlgCopy  (DialogPtr theDialog);
  764.     void    DlgDelete(DialogPtr theDialog);
  765. #
  766. #
  767. #
  768. /***ControlRecord***/ ControlPtr ControlHandle ControlManager
  769. ControlRecord(2g)
  770.  
  771. 【名前】
  772.     ControlRecord - データタイプ
  773.  
  774. 【形式】
  775.     ■ControlRecord    I-317
  776.       ControlRecord
  777.         struct    ControlRecord **nextControl;
  778.         WindowPtr    contrlOwner;
  779.         Rect        contrlRect;
  780.         unsigned char    contrlVis;
  781.         unsigned char    contrlHilite;
  782.         short        contrlValue;
  783.         short        contrlMin;
  784.         short        contrlMax;
  785.         Handle        contrlDefProc;
  786.         Handle        contrlData;
  787.         ProcPtr        contrlAction;
  788.         long        contrlRfCon;
  789.         Str255        contrlTitle;
  790.  
  791.       ControlPtr    ControlRecord *
  792.       ControlHandle    ControlRecord **
  793. /***NewControl***/ GetNewControl DisposeControl KillControls ControlManager
  794. NewControl(2g)
  795.  
  796. 【名前】
  797.     NewControl     - コントロールの作成
  798.     GetNewControl  - コントロールリソース('CNTL')の取得&表示
  799.     DisposeControl - コントロールの消去&開放
  800.     KillControls   - 指定ウインドウの全コントロールの解放
  801.  
  802. 【書式】
  803.     ■NewControl        I-319
  804.     ■GetNewControl        I-321
  805.     ■DisposeControl    I-321
  806.     ■KillControls        I-321
  807.     ■Popup-menu について    VI-3-16
  808.  
  809.     ControlHandle    NewControl(WindowPtr theWindow, const Rect *boundsRect,
  810.             ConstStr255Param title, Boolean visible, short value,
  811.             short min, short max, short procID, long refCon);
  812.         Valueにハイライトの状態を示します
  813.  
  814.         o boundsRect    位置, 大きさ
  815.         o title        タイトル名
  816.         o visible    TRUE の場合表示される
  817.         o value        設定値
  818.         o min,max    最小, 最大値 (check,radio = 0,1)
  819.         o procID    タイプ
  820.                 0    pushButProc
  821.                 1    checkBoxProc
  822.                 2    radioButProc
  823.                 16    scrollBarProc
  824.                 1008    popupMenuProc [Sys7.0 以降]
  825.                 その他    自分で作成したもの(詳細: I-328)
  826.  
  827.                 << 補助情報 >>
  828.                 8    useWFont    フォント windowと同じに
  829.                         (default: システムフォント)
  830.         o refCon    ユーザーデータ
  831.  
  832.  
  833.     ControlHandle    GetNewControl(short controlID, WindowPtr owner);
  834.             コントロールリソースを読み込み、ウインドウに表示
  835.  
  836.     void    DisposeControl(ControlHandle theControl);
  837.     void    KillControls(WindowPtr theWindow);
  838.  
  839.  
  840.     ** Popup-Menu コントロール **
  841.         popupFixedWidth        = 1 << 0,
  842.         popupReserved         = 1 << 1,
  843.         popupUseAddResMenu    = 1 << 2,
  844.         popupUseWFont        = 1 << 3,
  845.         popupTitleBold        = 1 << 8,
  846.         popupTitleItalic    = 1 << 9,
  847.         popupTitleUnderline    = 1 << 10,
  848.         popupTitleOutline    = 1 << 11,
  849.         popupTitleShadow    = 1 << 12,
  850.         popupTitleCondense    = 1 << 13,
  851.         popupTitleExtend    = 1 << 14,
  852.         popupTitleNoStyle    = 1 << 15};
  853.  
  854.         popupTitleLeftJust = 0x00000000,
  855.         popupTitleCenterJust = 0x00000001,
  856.         popupTitleRightJust = 0x000000FF,
  857. /***DrawControls***/ Draw1Control UpdtControl ControlManager
  858. DrawControls(2g)
  859.  
  860. 【名前】
  861.     DrawControls - コントロールを全て再描画
  862.     Draw1Control - コントロールの1つを再表示
  863.     UpdtControl  - 指定アップデートリージョンコントロールのみ再表示
  864.  
  865. 【書式】
  866.     ■DrawControls    I-322
  867.     ■Draw1Control    IV-53
  868.     ■UpdtControl    IV-53
  869.  
  870.     void    DrawControls(WindowPtr theWindow);
  871.  
  872.     void    Draw1Control(ControlHandle theControl);
  873.  
  874.     void    UpdtControl(WindowPtr theWindow, RgnHandle updateRgn);
  875. /***SetCTitle***/ GetCTitle HideControl ShowControl HiliteControl MoveControl SizeControl SetCtlValue GetCtlValue SetCtlMin GetCtlMin SetCtlMax GetCtlMax SetCRefCon GetCRefCon SetCtlAction GetCtlAction ControlManager
  876. SetCTitle(2g)
  877.  
  878. 【名前】
  879.     SetCTitle     - コントロールタイトルの設定
  880.     GetCTitle     - コントロールタイトルの取得
  881.     HideControl   - コントロールを隠す
  882.     ShowControl   - コントロールを表示
  883.     HiliteControl - コントロールのハイライト属性変更
  884.     MoveControl   - コントロールの移動
  885.     SizeControl   - コントロールのリサイズ
  886.     SetCtlValue   - 値の設定
  887.     SetCtlMin     - min の設定
  888.     SetCtlMax     - max の設定
  889.     GetCtlValue   - 値の取得
  890.     GetCtlMin     - min の取得
  891.     GetCtlMax     - max の取得
  892.     SetCRefCon    - 定義情報の設定
  893.     GetCRefCon    - 定義情報の取得
  894.     SetCtlAction  - アクション手続きを決める
  895.     GetCtlAction  - アクション手続きをえる
  896.  
  897. 【書式】
  898.     ■SetCTitle    I-321
  899.     ■GetCTitle    I-321
  900.     ■HideControl    I-322
  901.     ■ShowControl    I-322
  902.     ■HiliteControl    I-322
  903.     ■MoveControl    I-325
  904.     ■SizeControl    I-326
  905.     ■SetCtlValue    I-326
  906.     ■GetCtlValue    I-326
  907.     ■SetCtlMin    I-326
  908.     ■GetCtlMin    I-327
  909.     ■SetCtlMax    I-327
  910.     ■GetCtlMax    I-327
  911.     ■SetCRefCon    I-327
  912.     ■GetCRefCon    I-327
  913.     ■SetCtlAction    I-328
  914.     ■GetCtlAction    I-328
  915.  
  916.     コントロールの状態
  917.           種別          0          1
  918.         ---------------+---------------+-----
  919.         Button        Hilight        dark
  920.         Check Box    チェック
  921.         Radio Button    チェック
  922.         その他(scroll)
  923.  
  924.  
  925.     void    SetCTitle(ControlHandle theControl, ConstStr255Param title);
  926.     void    GetCTitle(ControlHandle theControl, Str255 title);
  927.  
  928.     void    HideControl(ControlHandle theControl);
  929.     void    ShowControl(ControlHandle theControl);
  930.             HideControl() すると、コントロールの領域を
  931.             background-pattren で塗り、update region に追加する
  932.  
  933.     void    HiliteControl(ControlHandle theControl, short hiliteState);
  934.  
  935.     void    MoveControl(ControlHandle theControl, short h, short v);
  936.     void    SizeControl(ControlHandle theControl, short w, short h);
  937.  
  938.     void    SetCtlValue(ControlHandle theControl, short theValue);
  939.     short    GetCtlValue(ControlHandle theControl);
  940.  
  941.     void    SetCtlMin(ControlHandle theControl, short minValue);
  942.     void    SetCtlMax(ControlHandle theControl, short maxValue);
  943.     short    GetCtlMin(ControlHandle theControl);
  944.     short    GetCtlMax(ControlHandle theControl);
  945.  
  946.     void    SetCRefCon(ControlHandle theControl, long data);
  947.     long    GetCRefCon(ControlHandle theControl);
  948.  
  949.     void    SetCtlAction(ControlHandle theControl, ProcPtr actionProc);
  950.     ProcPtr    GetCtlAction(ControlHandle theControl);
  951. /***FindControl***/ TrackControl TestControl DragControl ControlManager
  952. FindControl(2g)
  953.  
  954. 【名前】
  955.     FindControl  - マウス座標からコントロールを見つけだす
  956.     TrackControl - マウスの位置で応答処理する
  957.     TestControl  - パートコードの取得
  958.     DragControl  - コントロールをドラッグ
  959.  
  960. 【書式】
  961.     ■FindControl    I-323
  962.     ■TrackControl    I-323
  963.     ■TestControl    I-325
  964.     ■DragControl    I-325
  965.  
  966.     short    FindControl(Point thePoint, WindowPtr theWindow,
  967.             ControlHandle *theControl);
  968.         マウスの押された位置を渡すと、それがどのコントロールに向けら
  969.         れたのかわかります。どれでもないならnilです
  970.             10  inButton
  971.             11  inCheckBox
  972.  
  973.             20  inUpButton
  974.             21  inDownButton
  975.             22  inPageUp
  976.             23  inPageDown
  977.             129 inThumb
  978.  
  979.     short    TrackControl(ControlHandle theControl, Point thePoint,
  980.             ProcPtr actionProc);
  981.  
  982.         マウスの位置で応答処理する
  983.             actionProcは
  984.             nil    -ハイライトだけ
  985.             ProcPtr    -それにしたがう
  986.                 pascal void MyProc(ControlHandle theControl,
  987.                         short partCode);
  988.             POINTER(-1)-デフォルト
  989.  
  990.     short    TestControl(ControlHandle theControl, Point thePt);
  991.             指定座標がそのコントロールのどのパートなのかを調べる
  992.  
  993.     void    DragControl(ControlHandle theControl, Point startPt,
  994.             const Rect *limitRect, const Rect *slopRect,
  995.             short axis);
  996.  
  997.         コントロールをドラッグする。引数は、WindowのDragGrayRgnと同じ
  998. /***SetCtlColor***/ GetAuxCtl GetCVariant AuxCtlRec AuxCtlPtr AuxCtlHandle CtlCTab CCTabPtr CCTabHandle ControlManager
  999. SetCtlColor(2g)
  1000.  
  1001. 【名前】
  1002.     SetCtlColor -
  1003.     GetAuxCtl   -
  1004.     GetCVariant -
  1005.     CtlCTab     - データタイプ
  1006.     AuxCtlRec   - データタイプ
  1007.  
  1008. 【書式】
  1009.     ■SetCtlColor    V-222
  1010.     ■GetAuxCtl    V-222
  1011.     ■GetCVariant    V-222
  1012.  
  1013.     void    SetCtlColor(ControlHandle theControl,
  1014.                         CCTabHandle newColorTable);
  1015.  
  1016.     Boolean    GetAuxCtl(ControlHandle theControl, AuxCtlHandle *acHndl);
  1017.  
  1018.     short    GetCVariant(ControlHandle theControl);
  1019.  
  1020.     ■CtlCTab    V-218
  1021.       CtlCTab
  1022.         long        ccSeed;
  1023.         short        ccRider;
  1024.         short        ctSize;
  1025.         ColorSpec    ctTable[4];
  1026.       CCTabPtr    CtlCTab *
  1027.       CCTabHandle    CtlCTab **
  1028.  
  1029.     ■AuxCtlRec    V-217
  1030.       AuxCtlRec
  1031.         Handle        acNext;
  1032.         ControlHandle    acOwner;
  1033.         CCTabHandle    acCTable;
  1034.         short        acFlags;
  1035.         long        acReserved;
  1036.         long        acRefCon;
  1037.       AuxCtlPtr    AuxCtlRec *
  1038.       AuxCtlHandle    AuxCtlRec **
  1039. #
  1040. #
  1041. #
  1042. /***MenuInfo***/ MenuPtr MenuHandle MenuCRsrc MenuCRsrcPtr MenuCRsrcHandle MenuManager
  1043. MenuInfo(2g)
  1044.  
  1045. 【名前】
  1046.     MenuInfo  - データタイプ
  1047.     MenuCRsrc - データタイプ
  1048.  
  1049. 【形式】
  1050.     ■MenuInfo    I-345; V-230
  1051.       MenuInfo
  1052.         short    menuID;
  1053.         short    menuWidth;
  1054.         short    menuHeight;
  1055.         Handle    menuProc;
  1056.         long    enableFlags;
  1057.         Str255    menuData;
  1058.       MenuPtr    MenuInfo *
  1059.       MenuHandle    MenuInfo **
  1060.  
  1061.     ■MenuCRsrc    V-234
  1062.       MenuCRsrc
  1063.         short    numEntries;
  1064.         MCTable mcEntryRecs;
  1065.       MenuCRsrcPtr        MenuCRsrc *
  1066.       MenuCRsrcHandle    MenuCRsrc **
  1067. /***NewMenu***/ GetMenu DisposeMenu AppendMenu AddResMenu InsertResMenu MenuManager
  1068. NewMenu(2g)
  1069.  
  1070. 【名前】
  1071.     NewMenu       - メニューの作成
  1072.     GetMenu       - メニューリソース('MENU')の取得
  1073.     DisposeMenu   - メニューのメモリ開放
  1074.     AppendMenu    - メニューの最後にDataを付け加える
  1075.     AddResMenu    - メニューの最後にリソースを付け加える
  1076.     InsertResMenu - メニューの指定位置にリソースを付け加える
  1077.  
  1078. 【書式】
  1079.     ■NewMenu    I-351
  1080.     ■GetMenu    I-351; V-243
  1081.     ■DisposeMenu    I-352
  1082.     ■AppendMenu    I-352; V-243
  1083.     ■AddResMenu    I-353; V-243
  1084.     ■InsertResMenu    I-353; V-243
  1085.  
  1086.     MenuHandle    NewMenu(short menuID, const Str255 menuTitle);
  1087.     MenuHandle    GetMenu(short resourceID);
  1088.     void        DisposeMenu(MenuHandle theMenu);
  1089.  
  1090.     void    AppendMenu(MenuHandle menu, ConstStr255Param data);
  1091.           メニューの最後尾に、Dataを付け加えます。
  1092.           Meta charを参照
  1093.             ;    アイテムの区切り(または 0x0d)
  1094.             ^    ICON(1=257 〜 9=265)
  1095.             !    マークを付ける
  1096.             <    スタイルの指定
  1097.                     B Bold
  1098.                     I Italic
  1099.                     U Underline
  1100.                     O Outline
  1101.                     S Shadow
  1102.             /    ショートカットキー
  1103.             (    Disable
  1104.  
  1105.           例:    "(Too Much^1<B/T"
  1106.             "Undo;(-;Cut"        間に区切り線を入れる
  1107.  
  1108.     void    AddResMenu(MenuHandle theMenu, ResType theType);
  1109.     void    InsertResMenu(MenuHandle theMenu, ResType theType,
  1110.                             short afterItem);
  1111.           メニューに現在オープンされているリソースを全て付け加えます
  1112.               'DRVR'    DAなど
  1113.             'FONT'    フォント
  1114. /***InsertMenu***/ DrawMenuBar InvalMenuBar DeleteMenu ClearMenuBar GetNewMBar GetMenuBar SetMenuBar MenuManager
  1115. InsertMenu(2g)
  1116.  
  1117. 【名前】
  1118.     InsertMenu   - メニューをメニューバーに追加
  1119.     DrawMenuBar  - InsertMenu等で追加されたメニューをすべて描画
  1120.     DeleteMenu   - メニューバーからメニューを取り除く
  1121.     ClearMenuBar - 現メニューバーのクリア
  1122.     GetNewMBar   - メニューバーリソース('MBAR')を読込む
  1123.     GetMenuBar   - 現メニューバーをコピーし取得
  1124.     SetMenuBar   - 現メニューバーの設定
  1125.     InvalMenuBar - ??? (IM に載っていない)
  1126.  
  1127. 【書式】
  1128.     ■InsertMenu    I-353; V-244
  1129.     ■DrawMenuBar    I-354; V-244
  1130.     ■DeleteMenu    I-354; V-244
  1131.     ■ClearMenuBar    I-354; V-247
  1132.     ■GetNewMBar    I-354; V-247
  1133.     ■GetMenuBar    I-355
  1134.     ■SetMenuBar    I-355
  1135.     ■InvalMenuBar  ???
  1136.  
  1137.     void    InsertMenu(MenuHandle theMenu, short beforeID);
  1138.             beforeID =  0    最後に追加
  1139.                 0以外    追加するメニューID
  1140.                 -1    見えない位置に追加
  1141.                     (階層,PopUp メニュー用)
  1142.  
  1143.     void    DrawMenuBar(void);
  1144.             InsertMenu等でリストに乗せられたメニューをすべて描画します
  1145.  
  1146.     void    DeleteMenu(short menuID);
  1147.             メニューバーから取り除いたMenuHandleも、再アクセス可能です
  1148.  
  1149.     void    ClearMenuBar(void);
  1150.  
  1151.     Handle    GetNewMBar(short menuBarID);
  1152.  
  1153.     Handle    GetMenuBar(void);
  1154.             現在のメニューバーをコピーし、ハンドルを返します
  1155.  
  1156.     void    SetMenuBar(Handle menuList);
  1157.             GetMenuBar,GetNewMBarのメニューを活用するために使用します
  1158.  
  1159.     void    InvalMenuBar(void);
  1160. /***InsMenuItem***/ DelMenuItem MenuSelect MenuKey HiliteMenu MenuChoice MenuManager
  1161. InsMenuItem(2g)
  1162.  
  1163. 【名前】
  1164.     InsMenuItem - メニューアイテムの挿入
  1165.     DelMenuItem - メニューアイテムの削除
  1166.     MenuSelect  - メニューのマウスによる選択
  1167.     MenuKey     - ショートカットキーからメニューの番号を得る
  1168.     HiliteMenu  - メニューのハイライト
  1169.     MenuChoice  - disable-item のどれが選択されたか調べる
  1170.  
  1171. 【書式】
  1172.     ■InsMenuItem    IV-55
  1173.     ■DelMenuItem    IV-56; V-244
  1174.     ■MenuSelect    I-356; V-244
  1175.     ■MenuKey    I-356; V-245
  1176.     ■HiliteMenu    I-357; V-245
  1177.     ■MenuChoice    V-240
  1178.  
  1179.     void    InsMenuItem(MenuHandle theMenu, ConstStr255Param itemString,
  1180.             short afterItem);
  1181.  
  1182.         theMenuのafterItemの直後に、itemStringをつなげます。メタキャ
  1183.         ラクタでつなぐと、逆順になります
  1184.  
  1185.     void    DelMenuItem(MenuHandle theMenu, short item);
  1186.  
  1187.     long    MenuSelect(Point startPt);
  1188.           メニューバーの中にイベントが起きたとき、グローバル座標を渡し
  1189.           てください。
  1190.             戻り値:    0    キャンセル
  1191.                 上位ワード    menuID
  1192.                 下位ワード    itemNo (1〜)
  1193.  
  1194.     long    MenuKey(short ch);
  1195.           chにコマンドキーと一緒に押されたキーを渡してください。
  1196.           (MenuSelect参照)
  1197.  
  1198.     void    HiliteMenu(short menuID);
  1199.           引数が0やそのIDが存在しない場合、慨存のハイライト表示を消す
  1200.  
  1201.     long    MenuChoice(void);
  1202.           MenuSelect() が 0 を返した時にコールすると、disable-item の
  1203.           のどこではマウスが離されたかわかる。
  1204.             HiWord    menuID
  1205.             LoWord    item    (0 = 指定 menuID でキャンセルされた)
  1206. /***SetItem***/ GetItem DisableItem EnableItem CheckItem SetItemMark GetItemMark SetItemIcon GetItemIcon SetItemStyle GetItemStyle GetItemCmd SetItemCmd MenuManager
  1207. SetItem(2g)
  1208.  
  1209. 【名前】
  1210.     SetItem      - アイテム名の設定
  1211.     GetItem      - アイテム名の取得
  1212.     DisableItem  - アイテムを使用禁止に
  1213.     EnableItem   - アイテムを使用可能に
  1214.     CheckItem    - アイテムを check/uncheck する
  1215.     SetItemMark  - アイテムの左隣にマークをつける
  1216.     GetItemMark  - アイテムの左隣にあるマークを取得
  1217.     SetItemIcon  - アイテムの左隣にアイコンを付ける
  1218.     GetItemIcon  - アイテムの左隣にあるアイコン番号の取得
  1219.     SetItemStyle - アイテムスタイルの設定
  1220.     GetItemStyle - アイテムスタイルを取得
  1221.     SetItemCmd   - アイテムにサブメニューの設定
  1222.     GetItemCmd   - アイテムにサブメニューがついているかチェック
  1223.  
  1224. 【書式】
  1225.     ■SetItem    I-357
  1226.     ■GetItem    I-358
  1227.     ■DisableItem    I-358; V-246
  1228.     ■EnableItem    I-358; V-246
  1229.     ■CheckItem    I-358
  1230.     ■SetItemMark    I-359; V-246
  1231.     ■GetItemMark    I-359; V-246
  1232.     ■SetItemIcon    I-359; V-246
  1233.     ■GetItemIcon    I-360; V-246
  1234.     ■SetItemStyle    I-360
  1235.     ■GetItemStyle    I-360; V-247
  1236.     ■SetItemCmd    V-246
  1237.     ■GetItemCmd    V-240
  1238.  
  1239.     void    SetItem(MenuHandle theMenu, short item, const Str255 itemStr);
  1240.     void    GetItem(MenuHandle theMenu, short item, Str255 itemStr);
  1241.  
  1242.     void    DisableItem(MenuHandle theMenu, short item);
  1243.     void    EnableItem (MenuHandle theMenu, short item);
  1244.             item = 0 の場合、メニュー全体の設定となる
  1245.             (注意: DrawMenuBar() でメニューバーの再表示が必要)
  1246.  
  1247.     void    CheckItem(MenuHandle theMenu, short item, Boolean checked);
  1248.             checked: TRUE  - チェックをつける
  1249.                  FALSE - チェックをはずす
  1250.  
  1251.     void    SetItemMark(MenuHandle theMenu, short item, short markChar);
  1252.     void    GetItemMark(MenuHandle theMenu, short item, short *markChar);
  1253.             アイテムの左隣に、markChar をマークします
  1254.             アイテムの左隣にあるマークを返します
  1255.  
  1256.     void    SetItemIcon(MenuHandle theMenu, short item, short iconIndex);
  1257.     void    GetItemIcon(MenuHandle theMenu, short item, short *iconIndex);
  1258.             アイテムの左隣に、(icon-256)のIDのアイコンを付けます。
  1259.             ID=256のアイコンはできない
  1260.  
  1261.     void    SetItemStyle(MenuHandle theMenu, short item, short chStyle);
  1262.     void    GetItemStyle(MenuHandle theMenu, short item, Style *chStyle);
  1263.             例:    SetItemStyle(myMenu,2, bold|italic);
  1264.  
  1265.     void    SetItemCmd(MenuHandle theMenu, short item, short cmdChar);
  1266.     void    GetItemCmd(MenuHandle theMenu, short item, short *cmdChar);
  1267.             cmdChar = 0x1b --> サブメニューあり
  1268.  
  1269. 【使用例】
  1270.     1) メニューアイテムにサブメニューを設定する
  1271.         MenuHandle    theMenu;    メニューハンドル
  1272.         short        item;        アイテム番号
  1273.  
  1274.         SetItemMark(theMenu, item, 150/* 'MENU' のID */);
  1275.         SetItemCmd (theMenu, item, 0x1b);
  1276. /***CalcMenuSize***/ CountMItems GetMHandle FlashMenuBar SetMenuFlash InitProcMenu PopUpMenuSelect MenuManager
  1277. CalcMenuSize(2g)
  1278.  
  1279. 【名前】
  1280.     CalcMenuSize    - メニューのサイズの計算
  1281.     CountMItems     - メニューアイテム数のカウント
  1282.     GetMHandle      - メニューリスト中にあるメニューハンドルの取得
  1283.     FlashMenuBar    - メニューバーの反転
  1284.     SetMenuFlash    - ** マウスコントロールパネル用
  1285.     InitProcMenu    -
  1286.     PopUpMenuSelect - ポップアップメニューの選択
  1287.  
  1288. 【書式】
  1289.     ■CalcMenuSize        I-361
  1290.     ■CountMItems        I-361
  1291.     ■GetMHandle        I-361; V-246
  1292.     ■FlashMenuBar        I-361; V-246
  1293.     ■SetMenuFlash        I-361
  1294.     ■InitProcMenu        V-238
  1295.     ■PopUpMenuSelect    V-241
  1296.  
  1297.     void    CalcMenuSize(MenuHandle theMenu);
  1298.           メニューのサイズを計算して、レコード中のフィールドに格納
  1299.  
  1300.     short    CountMItems(MenuHandle theMenu);
  1301.  
  1302.     MenuHandle    GetMHandle(short menuID);
  1303.  
  1304.     void    FlashMenuBar(short menuID);
  1305.           menuID = 0 の場合は全体を反転(2回呼ぶことにより点滅できる)
  1306.  
  1307.     void    SetMenuFlash(short count);
  1308.  
  1309.     void    InitProcMenu(short resID);
  1310.  
  1311.     long    PopUpMenuSelect(MenuHandle menu, short top, short left,
  1312.             short popUpItem);
  1313. /***GetMCInfo***/ SetMCInfo DispMCInfo GetMCEntry SetMCEntries DelMCEntries MCEntry MCEntryPtr MCTable MCTablePtr MCTableHandle MenuManager
  1314. GetMCInfo(2g)
  1315.  
  1316. 【名前】
  1317.     GetMCInfo    -
  1318.     SetMCInfo    -
  1319.     DispMCInfo   -
  1320.     GetMCEntry   -
  1321.     SetMCEntries -
  1322.     DelMCEntries -
  1323.     MCEntry      - データタイプ
  1324.  
  1325. 【書式】
  1326.     ■GetMCInfo    V-239
  1327.     ■SetMCInfo    V-239
  1328.     ■DispMCInfo    V-239
  1329.     ■GetMCEntry    V-239
  1330.     ■SetMCEntries    V-239
  1331.     ■DelMCEntries    V-238
  1332.  
  1333.     MCTableHandle    GetMCInfo(void);
  1334.  
  1335.     void    SetMCInfo (MCTableHandle menuCTbl);
  1336.     void    DispMCInfo(MCTableHandle menuCTbl);
  1337.  
  1338.     MCEntryPtr    GetMCEntry(short menuID, short menuItem);
  1339.  
  1340.     void    SetMCEntries(short numEntries, MCTablePtr menuCEntries);
  1341.  
  1342.     void    DelMCEntries(short menuID, short menuItem);
  1343.  
  1344.  
  1345.     ■MCEntry    ??
  1346.       MCEntry
  1347.         short    mctID;
  1348.         short    mctItem;
  1349.         RGBColor mctRGB1;
  1350.         RGBColor mctRGB2;
  1351.         RGBColor mctRGB3;
  1352.         RGBColor mctRGB4;
  1353.         short    mctReserved;
  1354.  
  1355.       MCEntryPtr    MCEntry *
  1356.       MCTable    MCEntry    [1]
  1357.       MCTablePtr    MCEntry *
  1358.       MCTableHandle    MCEntry **
  1359. /***InitLayer***/ NewLayer DisposeLayer GetCurrentLayer SetCurrentLayer SwapCurrentLayer IsLayer GetChildWindows GetRootLayer LayerPtr LayerRecord LayerPeek
  1360. InitLayer(2g)
  1361.  
  1362. 【名前】
  1363.     InitLayer     - Layer Manager の初期化
  1364.     NewLayer     - 新しい Layer の作成
  1365.     DisposeLayer     - Layer の破棄
  1366.     GetCurrentLayer     - カレント Layer の取得
  1367.     SetCurrentLayer     - カレント Layer の設定
  1368.     SwapCurrentLayer - カレント Layer の設定をし元の Layer を取得
  1369.     IsLayer         - 指定ポートが Layer かチェック
  1370.     GetChildWindows     - Layer の(先頭の)子ウインドウを取得
  1371.     GetRootLayer     - ルート Layer の取得
  1372.     LayerPtr     - data type
  1373.     LayerRecord      - data type
  1374.  
  1375. 【書式】
  1376.     ■LayerManager    Inside Macintosh に記述なし
  1377.  
  1378.     #include "Layers.h"
  1379.  
  1380.     void        InitLayers(void);    ★この処理は行ってはいけない
  1381.  
  1382.     OSErr        NewLayer(LayerPtr* layerRef, Boolean visible,
  1383.                     Boolean neverActive, WindowPtr behind,
  1384.                     long refCon);
  1385.     void        DisposeLayer(LayerPtr layer);
  1386.  
  1387.     LayerPtr    GetCurrentLayer(void);
  1388.     void        SetCurrentLayer(LayerPtr layer);
  1389.     LayerPtr    SwapCurrentLayer(LayerPtr layer);
  1390.  
  1391.     Boolean        IsLayer(GrafPtr port);
  1392.  
  1393.     WindowPeek    GetChildWindows(LayerPtr layer);
  1394.  
  1395.     LayerPtr    GetRootLayer(void);
  1396.  
  1397.  
  1398.     ■LayerPtr    GrafPtr
  1399.  
  1400.     ■LayerRecord
  1401.         GrafPort    port;
  1402.         short        windowKind;
  1403.         Boolean        visible;
  1404.         Boolean        reserved1;    Always false.
  1405.         Boolean        neverActive;
  1406.         Boolean        reserved2;    Always false.
  1407.         RgnHandle    strucRgn;
  1408.         RgnHandle    contRgn;
  1409.         RgnHandle    reservedRgn;    Always valid empty region.
  1410.         Handle        windowDefProc;
  1411.         LayerPeek    parentLayer;
  1412.         AuxWinHandle    auxWindows;
  1413.         short        reserved3;    Always zero.
  1414.         AuxCtlHandle    auxControls;
  1415.         WindowPeek    nextWindow;
  1416.         WindowPeek    childWindows;
  1417.         long        refCon;
  1418.